package org.hxuhao;

import org.hxuhao.service.UserService;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ConfigurableApplicationContext;

@SpringBootApplication
public class Application {


    public	static	void	main(String[]	args) throws InterruptedException {
        ConfigurableApplicationContext context = SpringApplication.run(Application.class, args);
        UserService userService = context.getBean(UserService.class);
        userService.getById();

        new Thread(()->{
            context.getBean(UserService.class).getById();
        }).start();


        Thread.sleep(1000*1000);
    }
}
